notebook: properly subtract the initial_gap width from the tab space
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 21 Nov 2011 17:08:11 +0000 (12:08 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 21 Nov 2011 19:19:36 +0000 (14:19 -0500)
Instead of modifying the allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=664494

gtk/gtknotebook.c

index 1c0fbf84d016eff3f02d291aa49f7d31843408a2..59906f8176dfc8415c181e50005bceac373389a6 100644 (file)
@@ -5436,9 +5436,6 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
 
   gtk_widget_get_allocation (widget, &allocation);
 
-  allocation.x += initial_gap;
-  allocation.width -= 2 * initial_gap;
-
   switch (tab_pos)
     {
     case GTK_POS_TOP:
@@ -5504,6 +5501,9 @@ gtk_notebook_tab_space (GtkNotebook *notebook,
       break;
     }
 
+  *min += initial_gap;
+  *max -= (2 * initial_gap);
+
   if (!priv->scrollable)
     *show_arrows = FALSE;
   else